package com.thz.houserental.domain.reservation;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.thz.houserental.infrastructure.table.User;

import java.util.List;

public interface ReservationService extends IService<Reservation> {
    Reservation addReservation(String houseId);

    void collect(String houseId);

    /**
     * 查询用户房屋收藏列表，若用户id未传默认当作当前登录用户
     * @param userId 用户id
     * @param reservationPage 分页参数
     */
    Page<ReservationVo> getUserAllReservation(String userId, Page<ReservationVo> reservationPage);

    Page<ReservationVo> getAll(QueryWrapper<Reservation> queryWrapper, Page<ReservationVo> reservationPage);

    List<User> getLikedUsers(String houseId);

    List<User> getCollectUsers(String houseId);

    Page<ReservationVo> getAllReservationPage(Page<ReservationVo> reservationVoPage, ReservationVo reservationVo);
}
